package iohomework;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo02 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("zy.dat");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        Student kj=new Student("柯洁", 26,"男","88周保持围棋分第一，拔罐王");
        oos.writeObject(kj);
        System.out.println("写入成功");
        oos.close();
    }
}
